<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>观海听潮 · 博客</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="__ADMIN__/plugins/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="__ADMIN__/plugins/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="__ADMIN__/plugins/Ionicons/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="__ADMIN__/custom/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="__ADMIN__/custom/css/_all-skins.min.css">
    <!-- Morris chart -->
    <link rel="stylesheet" href="__ADMIN__/plugins/morris/morris.css">
    <!-- jvectormap -->
    <link rel="stylesheet" href="__ADMIN__/plugins/jvectormap/jquery-jvectormap.css">
    <!-- Date Picker -->
    <link rel="stylesheet" href="__ADMIN__/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="__ADMIN__/plugins/bootstrap-daterangepicker/daterangepicker.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="__ADMIN__/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <!-- Google Font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
    <link rel="stylesheet" type="text/css" href="__ADMIN__/plugins/layui/css/layui.css" />
    <!-- jQuery 3 -->
    <script src="__ADMIN__/plugins/jquery/dist/jquery.min.js"></script>
    <!-- jQuery UI 1.11.4 -->
    <script src="__ADMIN__/plugins/jquery-ui/jquery-ui.min.js"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
        // $.widget.bridge('uibutton', $.ui.button);
    </script>
    <!-- Bootstrap 3.3.7 -->
    <script src="__ADMIN__/plugins/bootstrap/js/bootstrap.min.js"></script>
    <!-- Morris.js charts -->
    <script src="__ADMIN__/plugins/raphael/raphael.min.js"></script>
    <script src="__ADMIN__/plugins/morris/morris.min.js"></script>
    <!-- Sparkline -->
    <script src="__ADMIN__/plugins/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
    <!-- jvectormap -->
    <script src="__ADMIN__/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="__ADMIN__/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
    <!-- jQuery Knob Chart -->
    <script src="__ADMIN__/plugins/jquery-knob/dist/jquery.knob.min.js"></script>
    <!-- daterangepicker -->
    <script src="__ADMIN__/plugins/moment/min/moment.min.js"></script>
    <script src="__ADMIN__/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>
    <!-- datepicker -->
    <script src="__ADMIN__/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
    <!-- Bootstrap WYSIHTML5 -->
    <script src="__ADMIN__/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
    <!-- Slimscroll -->
    <script src="__ADMIN__/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="__ADMIN__/plugins/fastclick/lib/fastclick.js"></script>
    <!-- AdminLTE App -->
    <script src="__ADMIN__/custom/js/adminlte.min.js"></script>
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
    <script src="__ADMIN__/custom/js/dashboard.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="__ADMIN__/custom/js/demo.js"></script>
    <script src="__ADMIN__/plugins/layui/layui.js"></script>
</head>
<style>
    .content-header h1 {
        background: #fff;
        padding: 10px 10px;
        border-radius: 2px;
    }
</style>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        {block name="style"}{/block}
        {include file="public/header"}
        {include file="public/side"}
        <div class="content-wrapper">
            <section class="content-header">

                {foreach name="Think.session.side_navs" item="val"}
                {if condition="$Request.controller eq 'Index'"}
                <h1>首页
                    <small>控制面板</small></h1>
                <ol class="breadcrumb">
                    <li><a href="{:url('index')}"><i class="fa fa-dashboard"></i> 首页</a></li>
                    <li class="active">首页</li>
                </ol>
                {elseif condition="$val['href'] eq $Request.controller"}
                <h1>{$val['name']}
                    {foreach name="val.child" item="v"}
                    {if condition="strstr($v['href'],$Request.action)"}
                    <small>{$v.name}</small>
                    {/if}
                    {/foreach}
                </h1>
                <ol class="breadcrumb">
                    <li><i class="fa {$val['icon']}"></i> {$val['name']}</li>
                    {foreach name="val.child" item="v"}
                    {if condition="strstr($v['href'],$Request.action)"}
                    <li class="active"><a href="{$v.href}">{$v.name}</a></li>
                    {/if}
                    {/foreach}
                </ol>
                {/if}
                {/foreach}
            </section>
            {block name="body"}{/block}
        </div>
        {include file="public/footer"}</div>
    <script>
        function getBodyColor() {
            setTimeout(function () {
                bodyColor = '';
                var bodyclass = $('body').prop('class');
                var bodyclassArr = bodyclass.split(' ');
                for (var i = 0; i < bodyclassArr.length; i++) {
                    if (bodyclassArr[i].indexOf("skin") != -1) {
                        bodyColor = bodyclassArr[i];
                    }
                }
                return bodyColor;
            }, 1000)
        }
        layui.use('layer', function () {
            var layer = layui.layer;
            var admin_id = '{$Think.session.admin_id}';
            if (!admin_id) {
                //登录超时
                layer.alert('登录超时，请重新登录', {
                    title: '温馨提示',
                    skin: getBodyColor(), //样式类名
                    closeBtn: 0
                }, function (index) {
                    layer.close(index);
                    location.href = "{:url('index/login')}";
                });
            }
        });
    </script>
</body>

</html>